package cn.wolfcode.car.business.query;

import cn.wolfcode.car.common.base.query.QueryObject;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Calendar;
import java.util.Date;

@Data
public class CarPackageAuditQuery extends QueryObject {
    //创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
    //最后审核时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date auditTime;

    public Date getAuditTime(){
        if(this.auditTime!=null){
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(this.auditTime);
            calendar.set(Calendar.HOUR_OF_DAY,23);
            calendar.set(Calendar.MINUTE,59);
            calendar.set(Calendar.SECOND,59);
            return calendar.getTime();
        }
        return null;
    }

    //审核人id
    private Long auditorId;

    private Integer status;

    private String auditorName;
}
